package com.demo.security.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

/**
 * @author molong
 * @since 2024/5/23
 */
@Configuration
@ConfigurationProperties("com.demo.security")
public class AuthenticationProperties {
    /**
     * jwt 参数设置
     */
    private JwtProperties jwt = new JwtProperties();

    /**
     * Spring security 5.0取消了由配置文件配置过滤路径,这里重新启动此配置
     * 默认对OAUTH2用户同步,验证码,登录非对称加密明码获取不进行拦截
     * 项目不需要拦截的路由
     */
    private List<String> ignorePaths = new ArrayList<>();

    public void setJwt(JwtProperties jwt) {
        this.jwt = jwt;
    }

    public JwtProperties getJwt() {
        return jwt;
    }

    public List<String> getIgnorePaths() {
        return ignorePaths;
    }

    public void setIgnorePaths(List<String> ignorePaths) {
        this.ignorePaths = ignorePaths;
    }
}
